{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=315
  Verdict: Accepted
}
uses SysUtils, Math;
 
var
	i,a:longint;
	ans:int64;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(a);
ans:=0;
for i:=1 to a do
	inc(ans,i*i);
write(ans);
end.